//== SAGITTARIUS ============================================================================

//== FILEDOC =========================================================================

/** @file sm_c.h
  * @brief Contains C backend for the DFA generator
  * @details See @ref sm_c.c for internals
  */

//== BEGINNING OF CODE ===============================================================

#ifndef __SAGUTTARUIS__SM_C__H_
#define __SAGUTTARUIS__SM_C__H_

//== INCLUDES ========================================================================

#include "sagittarius/core/SagittariusCore.h"
#include "sagittarius/lexer/sm.h"
#include "sagittarius/lexer/dfa.h"
#include "sagittarius/unicode/CUnicode.h"
#include "sagittarius/lexer/lParser.h"

#define SM_C_INVALID_TRANSITION 0xFFFF0000

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief State machine backend for C
 * @param[out] buf Output buffer for C source - callee does allocation
 * @param[in]  sm State machine representation
 * @param[in]  v Variables
 * @param[in]  nv Number of variables
 */
void dfa2sm_c(UnicodeCChar** buf, smrep* sm, lexvar* v, uint64 nv);

#ifdef __cplusplus
}//extern "C"
#endif

#endif
